<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<title>弹出窗口</title>

</head>
<body>
<input type=button value="Alert" onclick="callalert()"> <br>
<input type=button value="Prompt" onclick="callprompt()"> <br>
<input type=button value="Confirm" onclick="callcomfirm()"> <br>
<script>
function callalert(){
var val=alert("this is alert");
console.log(val);
}

function callprompt(){
var val=prompt("please enter you name");
console.log(val);
}

function callcomfirm(){
var val=confirm("are you sure");
console.log(val);
}
</script> 
</body>
</html>